package gui;

import service.FileManager;
import service.ScoreManager;
import service.StudentManager;

import javax.swing.*;

/**
 * 图形界面启动类
 */
public class GUILauncher {
    
    /**
     * 启动图形界面
     */
    public static void main(String[] args) {
        // 设置Swing的外观
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        // 创建管理器实例
        ScoreManager scoreManager = new ScoreManager();
        StudentManager studentManager = new StudentManager();
        FileManager fileManager = new FileManager();
        
        // 启动主窗口
        SwingUtilities.invokeLater(() -> {
            MainFrame mainFrame = new MainFrame(scoreManager, studentManager, fileManager);
            mainFrame.setVisible(true);
        });
    }
}